//This is a use of an already deleted variable.

#include <iostream>

class LOL
{
	int * ptr;
};

static void case1()
{
	int * a = new int;
	delete a;
	delete a;
	a = 0;
}

static void case2()
{
	int * a = new int;
	delete a;
	*a = 1;
	a = 0;
}

static void case3()
{
	int * a = new int;
	delete a;
	std::cout << *a;
	a = 0;
}

static void case4()
{
	int * a = new int;
	int * b = a;
	delete b;
	std::cout << *a;
	a = 0;
}

int main(int argc, char * argv[])
{
	case1();
	case2();
	case3();
	case4();
}
